import request from '@/utils/request'

export function getChannelRoleList(params) {
  return request({
    url: '/channel-role/list',
    method: 'post',
    data: params
  })
}

export function getChannelRoleDetail(channelRoleId) {
  return request({
    url: '/channel-role/' + channelRoleId,
    method: 'get'
  })
}
export function deleteChannelRole(channelRoleId) {
  return request({
    url: '/channel-role/' + channelRoleId,
    method: 'delete'
  })
}
export function createChannelRole(params) {
  return request({
    url: '/channel-role/add',
    method: 'post',
    data: params
  })
}
export function updateChannelRole(params) {
  return request({
    url: '/channel-role/update',
    method: 'put',
    data: params
  })
}

export function getChannelList() {
  return request({
    url: '/channel-role/getChannelList',
    method: 'get'
  })
}
export function getChannelRoles() {
  return request({
    url: '/channel-role/getChannelRoles',
    method: 'get'
  })
}
